//
//  MCLogger.m
//  Makecalls
//
//  Created by  leb on 13-11-11.
//  Copyright (c) 2013年 li enbao. All rights reserved.
//

#import "MCLogger.h"

@implementation MCLogger

+ (id)sharedInstance
{
    static dispatch_once_t pred;
    static MCLogger *sharedInstance = nil;
    dispatch_once(&pred, ^{
        sharedInstance = [[MCLogger alloc] init];
    });
    return sharedInstance;
}

- (void)setUmengKey:(NSString *)appKey channelID:(NSString *)channelID
{
    self.appKey = appKey;
    self.channelID = channelID;
    [MobClick startWithAppkey:self.appKey reportPolicy:BATCH channelId:self.channelID];
#if DEBUG
    [MobClick setLogEnabled:YES];
#endif
}

- (void)event:(NSString *)eventId attributes:(NSDictionary *)attributes
{
    [MobClick event:eventId attributes:attributes];
    //DLog(@"evenid:%@, param:%@", eventId, attributes);
}

@end
